<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<div>
    <!--v-o:事件名="方法“ 给元素绑定事件-->
    <input type="button" value="按钮1" v-on:click="f()">
    <!--事件绑定简写-->
    <input type="button" value="按钮2" @click="f()">



</div>
<script src="https://lf3-cdn-tos.bytecdntp.com/cdn/expire-1-M/vue/2.6.14/vue.js"></script>
<script>
    let v = new Vue({
        el:"div",
        data:{

        },methods:{
            f:function (){
            alert("啦啦啦");
            }
        }
    });
</script>
</body>
</html>